
#ifndef __IOCP_IO_UTIL_H__
#define __IOCP_IO_UTIL_H__

#include "iocpdef.h"
#ifdef __cplusplus
extern "C" {
#endif
    BOOL ioutil_get_remote(HIOCPFILE hObject, SOCKADDR_IN * pRemote);
    BOOL ioutil_get_local(HIOCPFILE hObject, SOCKADDR_IN * pLocal);
    BOOL ioutil_bind(HIOCPFILE hObject, SOCKADDR_IN * pBindAddr);
    BOOL ioutil_bind_local(HIOCPFILE hObject, unsigned short uPort);
    BOOL ioutil_keepalive(HIOCPFILE hObject, DWORD dwIdleMilliseconds,
        DWORD dwIntervalMilliseconds);

    BOOL ioutil_dont_fragment(HIOCPFILE hObject, BOOL bDont);
    BOOL ioutil_set_sockopt(HIOCPFILE hObject, int nLevel, int nOptName,
        LPVOID pOptVal, int nOptLen);
    BOOL ioutil_ioctl(HIOCPFILE hObject, DWORD dwType, LPVOID pVal, int nValLen);
    unsigned short ioutil_checksum(PUSHORT usData, UINT uSize);
#ifdef __cplusplus
};
#endif

#endif